Skip to content

[Link new device] Rotate QrCode instead of showing an error#6817

Merged
bmarty merged 10 commits into
developfrom
feature/bma/automaticRetry
May 21, 2026
Merged

[Link new device] Rotate QrCode instead of showing an error#6817
bmarty merged 10 commits into
developfrom
feature/bma/automaticRetry

Conversation

@bmarty
Copy link
Copy Markdown
Member

@bmarty bmarty commented May 19, 2026

Content

When a QrCode is displayed, the user has about 1 minute to scan the QrCode. After the rendezvous session is closed and cannot be used anymore. To mitigate this, the application is now automatically rotating the QrCode 10 times, to give enough time for the user to scan the code. After 10 times, the existing error screen is shown, to avoid having infinite retry.

There is still a doubt on how the timeout is detected (I asked in the internal room), but the test are working fine here.

The application is showing a spinner instead of the QrCode only if the QrCode (re)generation is taking more than 1 second, to have a smooth transition between 2 consecutive QrCodes.

Motivation and context

Closes #6806

Screenshots / GIFs

Screen_recording_20260519_150935.mp4

Tests

  • Login to a server that have the Link new device feature (for instance element.io)
  • On the setting click on "Link new device"
  • Click on "Mobile device"
  • A first QrCode should be displayed
  • Every minutes, during 10 minutes, a new QrCode should be displayed
  • After 10 minutes an error is displayed

It should be possible to scan any QrCode to link a new device
All back press should be correclty handled (for st QrCode and next ones).

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • This PR was made with the help of AI:
    • Yes. In this case, please request a review by Copilot.
    • No.
  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly defines what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@bmarty bmarty requested a review from a team as a code owner May 19, 2026 13:07
@bmarty bmarty requested review from jmartinesp and removed request for a team May 19, 2026 13:07
@bmarty bmarty added PR-Wip For anything that isn't ready to ship and will be enabled at a later date Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. labels May 19, 2026
@github-actions github-actions Bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label May 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/xke7CC

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

❌ Patch coverage is 91.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.27%. Comparing base (5af5790) to head (b4f23d9).
⚠️ Report is 37 commits behind head on develop.

Files with missing lines Patch % Lines
...eatures/linknewdevice/impl/LinkNewMobileHandler.kt 25.00% 3 Missing ⚠️
...inknewdevice/impl/screens/qrcode/ShowQrCodeView.kt 93.75% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6817   +/-   ##
========================================
  Coverage    81.27%   81.27%           
========================================
  Files         2648     2651    +3     
  Lines        74169    74214   +45     
  Branches      9619     9622    +3     
========================================
+ Hits         60281    60321   +40     
- Misses       10341    10346    +5     
  Partials      3547     3547           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bmarty bmarty force-pushed the feature/bma/automaticRetry branch from ff33676 to 900b888 Compare May 19, 2026 16:44
@bmarty bmarty requested a review from jmartinesp May 20, 2026 07:28
Copy link
Copy Markdown
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the latest changes, it looks way cleaner now!

@bmarty bmarty enabled auto-merge May 21, 2026 07:54
@sonarqubecloud
Copy link
Copy Markdown

@bmarty bmarty merged commit 4526563 into develop May 21, 2026
32 checks passed
@bmarty bmarty deleted the feature/bma/automaticRetry branch May 21, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Wip For anything that isn't ready to ship and will be enabled at a later date

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] Replace the "sign in was not completed in time" QR code error with an automatic retry.

3 participants